/**
 * Copyright (c) 2011 eelpo.com
 * All rights reserved.
 */
package com.eelpo.cmmp.core.wicket.panel.grid.column;

import org.apache.wicket.IClusterable;
import org.apache.wicket.util.lang.EnumeratedType;

/**
 * 列的宽度
 * 
 * @author <a href="mailto:Brian@eelpo.com">汪洪州</a>
 * @since 1.0
 */
public class ColumnLocation implements IClusterable {

	private int size;
	private Unit unit;
	private static final long serialVersionUID = -5970700579829070111L;

	public ColumnLocation(int size, Unit unit) {
		this.size = size;
		this.unit = unit;
	}

	public int getSize() {
		return size;
	}

	public Unit getUnit() {
		return unit;
	}

	public static final class Unit extends EnumeratedType {

		public static Unit PX = new Unit("PX");

		public static Unit EM = new Unit("EM");

		public static Unit PERCENT = new Unit("PERCENT");

		private static final long serialVersionUID = 2368982530652056888L;

		public Unit(String name) {
			super(name);
		}
	};
}
